home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
EDITOR
/
AMAC44.ARJ
/
MACR33.QM
< prev
next >
Wrap
Text File
|
1992-06-22
|
38KB
|
813 lines
* MACR33.QM, v3.3b
* Macros To Make, Convert and Read Macros
* Written by Tom Hogshead
* With Macro Contributions By Tim Farley
* 6/22/92
*
* @f6 Condense Qmac Macro to Fit On One Line of Qconfig.dat ( ) |new
* @2 Reads "Standard" Macros
* @8 Reads Current Txtfile Macros
* @3 Append Designated Txtfile With Current Macros, Reads Macfile
* @4 Appends Current Txtfile To Standard Macros, Reads Macfile
* @5 Gets Error File In Window To Find Another Error
* @6 Makes Dummy Txtfile From Current Macros
* @7 Makes & Reads Dummy Macfile From Txtfile, With Error Window
* @t Makes & Reads Dummy Macfile From Txtfile, SMALL
* @9 Makes Macfile of Current Txtfile Macros, No Macfile Read
* @0 Makes & Reads Macfile of Current Txtfile, With Error Window
* @q Makes & Reads Macfile of Current Txtfile Txtfile, SMALL
* @f1 Makes Single Column Macro
* @f2 Puts Command Key Beside A Single Command In A Macro
* @f3 Puts Command Key Beside ALL Commands In A Macro
* @f4 Gets A Single Command And It's Key On Screen
* @f5 Test TRUE/FALSE Results, Tim Farley, Author
* @3 {e:\up\mis006} Test True/False for WhiteSpace/Non-WhiteSpace
* @h Jump to Index Item on Cursor Line
*
* Index Use - How to jump to macro or item from Index using @h
* Description - MacroMaker Macros
* Requirements - and use
* Startup - See MACR.DOC for startup instructions
* Macros
* Other Macros - not included
* Version History
*
*-- eoi
*
* (Description)
*---------------
* MACRxx.ZIP contains QEdit macros to easily make and convert macros to
* and from text/binary (txtfile/macfile) using QMAC macro translator.
*
* (Requirements) and Use. See MACR.DOC for (startup) instructions
*------------------------------------------------------------------
* 1. Txtfile name extension MUST be [file].QM, Macfile [file].MAC.
* 2. Change ram disk c:\ (also in batch files) for your setup.
* Ram disk is optional but faster than a hard drive. Use any
* active drive letter to replace c:\.
* 3. Batch files must be in path or current directory.
* 4. Modify "g:\qe\MACROS.xxx" in macros to your "standard" macro.
* Be careful to use or not use extension as shown, with spaces.
* 5. Be sure to change "g:\qe\qconfig.dat" in the macros @f2 -
* @f4 below to the location of your qconfig.dat in your
* setup, and convert with QMAC.
* 6. In order for macros @f2 - @f4 to find a command in
* Qconfig.dat, there must be at least eight blank spaces
* betweeen the end of the command key and the beginning of
* the command. If your Qconfig.dat has fewer spaces, the
* macros must be modified in the first 'FIND' line.
* 7. Insert must be ON.
* 8. These macros require "QEdit and QMAC v2.1, February, 1990"
* or later. @0 and @f3 require v2.15.
* 9. Insert must be On.
* To BEGIN, just type "START MACR" <Enter>. All pertinent files will
* be loaded in the "Ring" for viewing, and MACR33.MAC is read.
*
* (Index) Use
*-------------
* To locate a macro or item in this file, press @h, place the cursor
* line on the desired item in the Index above, and press <enter>.
* See BOOKxx.QM for more details.
* M A C R O S
* ----------------------------------------------------------------------
* @(2) - Reads "Standard" (Macros)
* ----------------------------------------------------------------------
* Remember you MUST modify "g:\qe\macros.mac" with your "standard" macfile.
@2 MacroBegin MacroRead "g:\qe\macros.mac" Return
*
* 38 bytes Fri 09-14-1990 14:05:43
* 38 bytes Mon 10-14-1991 10:57:25 (TH @2)
*
* ----------------------------------------------------------------------
* @(3) - Append Designated Txtfile With Current Macros, Reads Macfile
* ----------------------------------------------------------------------
@3 macrobegin onewindow dropanchor
editfile "NUL" return quit gotoblockbeg editfile return
"Merge macro ?" cursorright * query for macro name, no extension
markcharacter pause copy
macrowrite "dum4.mac" return return
quit
DOS "qmacM " paste return return * append designated to current macros
editfile "c:!" return quit horizontalwindow editfile return
insertdate inserttime
find "(" return delline return * find first error
jfalse NOERROR wordright markword copy
savefile prevwindow
gotoline paste return * move to line with first error
makectrofscreen pause
jump CONTINUE
NOERROR:
prevwindow
CONTINUE:
onewindow
editfile "dum4.qm" return * load txtfile with appended macro
splitline newfile "N" return * re-load in case previous copy loaded
endfile addline "*...Tom Hogshead " * (change to your name)
insertdate inserttime "Appended "
paste * paste file name we are appending
endline ".qm to current macros"
unmarkblock savefile * save new txtfile with appended macro
macroread "dum4.mac" return * read current + appended macros
*
* 262 bytes Wed 05-01-1991 12:26:00
* 263 bytes Fri 10-18-1991 13:57:46 (TH @3)
* ┌───────────────────────── QMACM.BAT ──────────────────────────────┐
* │ rem qmacM.bat Sun 09-30-1990 │
* │ rem * Converts current macros to dum4.qm text... │
* │ QMAC dum4.mac dum4.qm /T /A- >c:! │
* │ rem * Appends macros to be merged to dum4.qm.... │
* │ QMAC %1.mac dum4.qm /T /A+ >>c:! │
* │ rem * Converts appended macro to binary......... │
* │ QMAC dum4.mac dum4.qm /B /A- >>c:! │
* └──────────────────────────────────────────────────────────────────┘
*
* ----------------------------------------------------------------------
* @(4) - Appends Current Txtfile To Standard Macros, Reads Macfile
* ----------------------------------------------------------------------
* Remember you MUST modify "g:\qe\macros" (no extension) in this
* macro to your "standard" macfile.
* Be careful that the macro size of the txtfile you are appending plus
* the size of your standard macros do not exceed 2k, the macro buffer
* limitation. If this occurs, you will get an error message, and the
* macros will not be appended.
@4 macrobegin
unmarkblock savefile onewindow
DOS "qmacTA2 " currentfilename backspace backspace backspace " "
"g:\qe\macros" *<<<<<CHANGE Standard macros name, no ext.
return
begline insertline dropanchor currentfilename
storescrbuff "1" return cut
editfile "c:!" return quit
editfile paste return * return to current txtfile
horizontalwindow
editfile "c:!" return * get error file in window 2
find "(" return delline return * find first error
jfalse NOERROR wordright markword copy
savefile prevwindow
gotoline paste return * move to line with first error
makectrofscreen pause
jump CONTINUE
NOERROR: prevwindow
CONTINUE: onewindow * |
editfile "c:$" return killfile quit
editfile "dum3.qm" return quit editfile return * load dum3.qm
endfile addline begline
"*" cursorright "Tom Hogshead"
cursorright cursorright insertdate inserttime
"Appnd:" cursorright
getscrbuff "1" return unmarkblock * Insert file at eof
savefile
macroread currentfilename backspace backspace "MAC" return * read dum3.mac
*
* 229 bytes Wed 05-01-1991 12:45:43
* 229 bytes Sun 10-13-1991 13:48:43 (TH @4, changed e:\ to f:\)
* 202 bytes Fri 10-18-1991 14:45:55 (TH @4, shortened)
* 202 bytes Fri 10-18-1991 14:48:56 (TH @4)
* ┌───────────────────────── QMACTA2.BAT ────────────────────────────────┐
* │ @echo off │
* │ echo qmacTA2.BAT Sun 09-30-1990 │
* │ echo Appending %1.MAC TO %2.QM │
* │ echo . │
* │ if exist c:dum*.qm erase c:dum*.qm │
* │ rem c:\ is ram disk, change to any active directory │
* │ :1 │
* │ echo FIRST, Converting %1.QM TO %1.MAC │
* │ if not exist %1.QM goto NOTEXIST │
* │ QMAC %1.MAC %1.QM /B /A- %3 >c:! │
* │ echo Copying %2.QM TO c:dum1.QM & c:dum2.QM │
* │ copy %2.qm c:dum1.qm │
* │ copy %2.qm c:dum2.qm │
* │ :2 │
* │ echo SECOND, Appending %1.MAC TO c:dum2.QM │
* │ QMAC %1.MAC c:dum2.QM /T /A+ /W70 %3 >>c:! │
* │ echo Copying c:dum2.QM TO dum3.QM (Appended txtfile) │
* │ copy c:dum2.qm dum3.qm │
* │ :3 │
* │ echo THIRD, Converting dum3.QM TO dum3.MAC (Appended macfile) │
* │ QMAC dum3.MAC dum3.QM /B /A- %3 >>c:! │
* │ dir %1.qm >c:$ │
* │ dir %2.qm >>c:$ │
* │ dir c:dum?.qm >>c:$ │
* │ dir dum?.qm >>c:$ │
* │ dir %1.mac >>c:$ │
* │ dir %2.mac >>c:$ │
* │ dir dum?.mac >>c:$ │
* │ goto END │
* │ :NOTEXIST │
* │ echo %1.QM does not exist │
* │ :END │
* └──────────────────────────────────────────────────────────────────────┘
*
* ----------------------------------------------------------------------
* @(5) Gets Error File (C:!) In Window To Find Another Error
* ----------------------------------------------------------------------
* At the pause, cursor down to error line and press <enter>, or if no
* errors, press <enter> to return to cursor position when macro was
* invoked.
@5 macrobegin
defaultwordset *|
onewindow horizontalwindow
editfile "c:!" return begfile
pause markline find "(" return "L" return
jfalse NOERROR wordright markword copy
quit prevwindow gotoline paste return
jump CONTINUE
NOERROR: quit prevwindow
CONTINUE: onewindow
*
* 17 bytes Fri 09-14-1990 14:05:55
* 41 bytes Fri 10-18-1991 13:58:27 (TH @5)
* 42 bytes Mon 01-27-1992 13:58:11 (TH @5, added defaultwordset)
* 42 bytes Sun 05-17-1992 11:26:24 (TH @5, for all Qconfig's)
*
* ----------------------------------------------------------------------
* @(6) - Makes Dummy Txtfile From Current Macros
* ----------------------------------------------------------------------
@6 macrobegin
insertline begline macrowrite "c:$.mac" return "Y" delline
DOS "qmact c:$" return return * make c:$.qm
editfile backspace backspace backspace "qm" return quit * quit c:$.qm
editfile return killfile endfile * load c:$.qm
*
* 61 bytes Sat 09-15-1990 14:26:40
* 60 bytes Thu 10-17-1991 13:14:43 (TH @6, safer)
* ┌───────────────────────── QMACT.BAT ──────────────────────────────┐
* │ @echo off │
* │ : qmacT.bat December 21, 1991 │
* │ cls │
* │ echo Converts %1.MAC (binary) To %1.QM (text) │
* │ if not exist %1.MAC goto NOTEXIST │
* │ QMAC %1.MAC %1.QM /T /A- /I05 /W75 %2 %3 │
* │ goto END │
* │ :NOTEXIST │
* │ echo %1.MAC does not exist │
* │ :END │
* └──────────────────────────────────────────────────────────────────┘
*
* ----------------------------------------------------------------------
* @(7) - Makes & Reads Dummy Macfile From Txtfile, With Error Window
* ----------------------------------------------------------------------
@7 macrobegin
onewindow defaultwordset *|
endline cursorright writeblock "c:$.qm" return "O" backspace begline
begline insertline unmarkblock dropanchor currentfilename
storescrbuff "1" return cut
editfile return quit editfile return
DOS "qmacbj c:$" return return * make c:$.mac
begline insertline dropanchor currentfilename cut
editfile "c:!" return quit editfile paste return
horizontalwindow
editfile "c:!" return * load error file in window 2
insertdate inserttime
find "(" return delline return * find first error
jfalse NOERROR wordright markword copy
savefile prevwindow gotoline paste return makectrofscreen
pause
jump CONTINUE
NOERROR: prevwindow
CONTINUE: onewindow
DOS "qmact c:$" return return * make c:$.qm
editfile "c:$.qm" return quit editfile return * load c:$.qm
endfile addline "*" cursorright insertdate inserttime
getscrbuff "1" return unmarkblock * Insert file name at eof
killfile * kill c:$.qm
macroread currentfilename backspace backspace "MAC" return
*
* 185 bytes Wed 05-01-1991 13:19:11
* 173 bytes Thu 05-16-1991 11:52:26 (TH removed unnecessary c:$.qm)
* 177 bytes Fri 10-18-1991 13:58:42 (TH @7)
* 178 bytes Mon 01-27-1992 13:56:02 (TH @7, added defaultwordset)
* ┌───────────────────────── QMACBJ.BAT ─────────────────────────────┐
* │ @echo off │
* │ rem qmacBJ.bat Sun 09-30-1990 │
* │ cls │
* │ echo Converts %1.QM (text) To %1.MAC (binary) │
* │ echo Any errors will be in file c:! │
* │ if not exist %1.QM goto NOTEXIST │
* │ QMAC %1.MAC %1.QM /B /A- %2 %3 >c:! │
* │ goto END │
* │ :NOTEXIST │
* │ echo %1.QM does not exist │
* │ :END │
* └──────────────────────────────────────────────────────────────────┘
*
* ----------------------------------------------------------------------
* @(8) - Reads Macfile of Current Txtfile
* ----------------------------------------------------------------------
@8 macrobegin macroread currentfilename backspace backspace "mac" return
*
* 15 bytes Fri 09-14-1990 14:06:11
*
* ----------------------------------------------------------------------
* @(9) - Makes Macfile of Current Txtfile, No Macfile Read
* ----------------------------------------------------------------------
@9 macrobegin savefile
DOS "qmacb " currentfilename backspace backspace backspace return
*
* 23 bytes Fri 09-14-1990 14:06:14
* ┌───────────────────────── QMACB.BAT ──────────────────────────────┐
* │ @echo off │
* │ rem qmacB.bat Sun 09-30-1990 │
* │ cls │
* │ echo Converts %1.QM (text) To %1.MAC (binary) │
* │ if not exist %1.QM goto NOTEXIST │
* │ QMAC %1.MAC %1.QM /B /A- %2 %3 │
* │ goto END │
* │ :NOTEXIST │
* │ echo %1.QM does not exist │
* │ :END │
* └──────────────────────────────────────────────────────────────────┘
*
* ----------------------------------------------------------------------
* @(0) - Makes & Reads Macfile of Current Txtfile, With Error Window
* ----------------------------------------------------------------------
* This macro requires QEdit v2.15, and will fit on one line of Qconfig.dat.
@0 macrobegin
defaultwordset setscreenoff savefile onewindow unmarkblock dropanchor
DOS "qmacbj " currentfilename
backspace backspace backspace return return
editfile "c:!" return quit gotoblockbeg unmarkblock
horizontalwindow editfile return
find "(" return delline return * Find first error
jfalse NOERROR wordright markword copy
prevwindow gotoline paste return * Pos cursor on error
setscreenon pause setscreenoff
jump CONTINUE
NOERROR: quit prevwindow
CONTINUE:
onewindow macroread currentfilename backspace backspace "mac" return
*
* 94 bytes Wed 05-01-1991 13:38:07
* 80 bytes Thu 10-17-1991 13:41:58 (TH @0, shortened, QEdit v2.15 reqd.)
* 81 bytes Mon 01-27-1992 13:58:57 (TH @0, added defaultwordset)
*
* ----------------------------------------------------------------------
* @(t) Copies txtfile [file].QM to dummy txtfile,
* Makes and reads macfile, small version
* ----------------------------------------------------------------------
* This is an alternate version of @7. Errors during macro conversion are
* not saved in an error window. It is much smaller than @7.
@t MacroBegin
unmarkblock endline cursorright *|
writeblock "c:$.qm" return "O" backspace begline *|
DOS "qmacB c:$" Return Return * make temp macfile
DOS "qmacT c:$" Return Return * make temp txtfile
EditFile "c:$.qm" Return Killfile * Kill temp file
MacroRead "c:$.Mac" Return * read temp macfile
*
* 95 bytes Fri 09-14-1990 14:06:07
* 98 bytes Mon 10-14-1991 15:53:22 (TH @t)
*
* ----------------------------------------------------------------------
* @(q) Makes macfile from txtfile [file].QM
* Loads macfile [file].MAC, NO error window, SMALL
* ----------------------------------------------------------------------
@q macrobegin
savefile
DOS "qmacb " currentfilename backspace backspace backspace return return
macroread currentfilename backspace backspace "mac" return
*
* 35 bytes Fri 09-14-1990 14:06:22
*
* ----------------------------------------------------------------------
* @(h) Finds first word on cursor line marked in document below
* ----------------------------------------------------------------------
* See BOOKxx.QM for use of @h.
@h MacroBegin UnmarkBlock DefaultWordSet BegFile EndPara
MarkLine BegFile Find "(" Return "L" Return JFalse Label0
MakeCtrOfScreen BegFile UnmarkBlock MarkLine MarkLine
PrevPosition BegLine Pause WordRight MarkWord Copy EndPara
Find "(" Paste ")" Return "I" Return JFalse Label1 BegLine
MakeTopOfScreen ScrollUp Jump Label2 Label0: Label1: BegFile
Label2:
*
* 52 bytes Wed 07-31-1991 14:43:31 (TH @h, @4 in MACRxx.QM)
*
* ----------------------------------------------------------------------
* @(F1) Makes Single Column Macro
* ----------------------------------------------------------------------
* To make a single column macro with Alt_f1, place the cursor line
* anywhere in a macro txtfile (after loading the macfile) and press Alt
* and f1 at the same time. If a macro is not a marked block, the full
* txtfile is made into a single column macros.
@f1 macrobegin
endline cursorright writeblock "c:$.qm" return "O" backspace begline
DOS "qmacB c:$" return return * Make macfile
DOS "qmacT-n c:$" return return * Make txtfile
editfile "c:$.qm" return quit editfile return
endfile addline "*" cursorright
insertdate inserttime killfile * Date stamp
*
* 98 bytes Fri 09-14-1990 14:06:30
* 103 bytes Fri 10-18-1991 14:56:58 (TH @f1 in MACRxx.QM)
* 95 bytes Thu 11-14-1991 22:42:20 (TH @f1, removed currentfilename)
* ┌───────────────────────── QMACB.BAT ──────────────────────────────┐
* │ @echo off │
* │ rem qmacB.bat Sun 09-30-1990 │
* │ cls │
* │ echo Converts %1.QM (text) To %1.MAC (binary) │
* │ if not exist %1.QM goto NOTEXIST │
* │ QMAC %1.MAC %1.QM /B /A- %2 %3 │
* │ goto END │
* │ :NOTEXIST │
* │ echo %1.QM does not exist │
* │ :END │
* └──────────────────────────────────────────────────────────────────┘
* ┌────────────────────────── QMACT-N.BAT ───────────────────────────┐
* │ @echo off │
* │ rem qmacT-n.bat for single column txtfile Sun 09-30-1990 │
* │ cls │
* │ echo Converts %1.MAC (binary) To %1.QM (text) │
* │ if not exist %1.MAC goto NOTEXIST │
* │ QMAC %1.MAC %1.QM /T /A- /W15 %2 %3 │
* │ goto END │
* │ :NOTEXIST │
* │ echo %1.QM does not exist │
* │ :END │
* └──────────────────────────────────────────────────────────────────┘
*
* ----------------------------------------------------------------------
* @(F2) Puts Key Beside Single Command
* ----------------------------------------------------------------------
* To get the key for a single command in a macro, place the cursor line
* on the command in a single column macro txtfile and press Alt_f2. The
* key corresponding to the command will be listed next to the commmand.
* Commands must be a single command column macro made with @f1.
@f2 macrobegin
unmarkblock insertline begline
dropanchor currentfilename storescrbuff "1" return cut
begline wordright markword copy
editfile "g:\qe\qconfig.dat" return * *<<<<<CHANGE
begfile
FIND " " * insert 8 spaces before find
paste * paste command for find
return "IW" return * find command in qconfig.dat
jfalse NOFIND
wordright markcolumn * move cursor to command
begline "* " begline markcolumn
storescrbuff "2" return * get key to scrbuff
cursordown unmarkblock
getscrbuff "1" return cut * cut currentfilename
editfile paste return
markcolumn gotocolumn "33" return * postition to get key
getscrbuff "2" return * get key
makectrofscreen
begline cursordown
jump END * End after getting key
NOFIND: * come here if no key for command
getscrbuff "1" return cut * cut currentfilename
editfile paste return
gotocolumn "33" return "* "
cursordown begline
END:
*
* 145 bytes Mon 02-18-1991 12:32:15
* 145 bytes Sun 10-13-1991 13:49:41 (TH @f2, changed e:\ to f:\)
* 144 bytes Fri 10-18-1991 15:06:12 (TH @f2, shortened)
*
* ----------------------------------------------------------------------
* @(F3) Puts Key Beside All Commands In Single Column Macfile
* ----------------------------------------------------------------------
* To get the keys for ALL commands in a macro, place the cursor
* line at the top of a macro txtfile and press Alt_f3. An example of
* this output is shown at the end of this macro. The keys corresponding
* to each command will be listed also in a single column next to the
* command. This macro requires QEdit v2.15.
@f3 macrobegin
setscreenoff
unmarkblock insertline begline dropanchor currentfilename
storescrbuff "1" return
cut * delete temp line
START:
endline begline * line blank? if so end
jfalse END
begline wordright markword
copy unmarkblock * get command to scrap, unmark
editfile "g:\qe\qconfig.dat" return *<<<<<CHANGE
begfile
FIND " " * insert 8 spaces before find
paste * paste command for find
return "IW" return * find command in qconfig.dat
jfalse NOFIND
wordright markcolumn begline * move cursor to command
"* " begline markcolumn
storescrbuff "2" return * get key to scratch
cursordown unmarkblock * move down line, unmark command
quit * quit qconfig.dat
getscrbuff "1" return cut * cut currentfilename
editfile paste return
markcolumn
gotocolumn "33" return * postition to get key
setscreenon
getscrbuff "2" return * get key
unmarkblock setscreenoff
begline cursordown * move down to next command
makectrofscreen
jump START
NOFIND:
getscrbuff "1" return cut
editfile paste return
gotocolumn "33" return "* " * position to get key
setscreenon setscreenoff
begline cursordown * move down to next command
jump START
END:
*
* 154 bytes Mon 02-18-1991 12:32:44
* 154 bytes Sun 10-13-1991 13:50:44 (TH @f3, change e:\ to f:\)
* 160 bytes Thu 10-17-1991 13:30:02 (TH @f3, QEdit v2.15)
*
* ----------------------------------------------------------------------
* @(F4) Retrieves A Command And It'S Key From QCONFIG.DAT
* ----------------------------------------------------------------------
* This macro retrieves a command or all commands matching a selected
* find criteria from your QCONFIG.DAT file, displays the selected
* command(s) and it's key on the screen, and then removes the
* command(s) and it's key from the screen. For those of us who can
* never remember all the commands and can never find our reference
* sheet, this might help.
* To run, press Alt_f4, then enter the first letter (or more) of the
* command you want to know the key for, press 'Enter' to see the the
* command(s) and it's key, then press 'Enter' again to remove the
* command(s) and it's key from the screen.
* For example, to find the key for appendscrbuff, press:
* <Alt_f4>
* app
* <Enter>
* You should see the following highlighted on your screeen:
* ^b_a appendscrbuff
* Entering "b" instead shows all commands beginning with "b":
* ^h backspace
* ^home begscreen
* ^pgup begfile
* home begline
* backspace backspace *(note, at least 8 spaces required)
* Press 'Enter' to remove the command(s) and it's key from the screen,
* or press 'Esc' three times if you want to keep the command(s) on the
* screen for reference.
* Requires QEdit v2.15.
@f4 macrobegin setscreenoff setinsmode *|
unmarkblock insertline begline dropanchor currentfilename cut
editfile
"g:\qe\qconfig.dat" return *<<<<<CHANGE to you d:\path\
endline dropanchor * Mark to clear scratch
storescrbuff "1" return * Get to scratch
unmarkblock begfile * Go to begin qconfig.dat
setscreenon *|
FIND " " * Insert 8 spaces before find
pause * Pause for command to find
return "i" return * Find first command
Jfalse FAIL * Stop macro if search fails
jump NEXT
START:
setscreenoff *|
repeatfind *|
jfalse FINISH * Mark if found, quit if not
NEXT:
setscreenoff *|
markline begline * Mark command line
"* "
appendscrbuff "1" return * Append to scratch
cursordown unmarkblock * Move down, unmark command
jump START
FINISH:
quit * Quit qconfig.dat
editfile paste return
markcolumn
getscrbuff "1" return * Get command and key
delline begline
maketopofscreen
setscreenon *|
pause * Pause, then 'Enter' to..
setscreenoff *|
deleteblock * Clean up, remove block
Jump END
FAIL:
quit * Quit qconfig.dat
editfile paste return * Return to file we were
END: * editing if search fails
*
* 128 bytes Fri 03-29-1991 16:43:58
* 128 bytes Sun 10-13-1991 13:52:07 (TH @f4, changed e:\ to f:\)
* 128 bytes Mon 01-27-1992 14:30:21 (TH @f4, changed f:\ to g:\)
* 131 bytes Mon 04-20-1992 12:26:34 (TH @f4, QEdit v2.15 required)
*
* ----------------------------------------------------------------------
* @(F5) Test TRUE/FALSE Results, Tim Farley, author
* ----------------------------------------------------------------------
* Date: 07-30-90 (17:34) Number: 936 / 937
* To: KARL BRENDEL Refer#: 929
* From: TIM FARLEY Read: NO
* Subj: Testing TRUE/FALSE result Status: PUBLIC MESSAGE
* Conf: REGDOS (1) Read Type: GENERAL (A)
*
* KB>I'd suggest that when you need to know what a command returns,
* KB>and it appears not to return what you expect, that you write a
* KB>test macro which prints TRUE or FALSE according to the return,
* KB>and experiment with it.
*
* Surprising as it may seem (since I obviously have inside
* knowledge of the editor), I do just this myself! It's quicker
* for one thing....
*
* Here is the macro I use:
*
* (TH changed key from ^F10 to @F5)
@F5 MacroBegin
JTrue true
Find ".F." Pause Escape
Jump end
true:
Find ".T." Pause Escape
end:
*
* 28 bytes Mon 07-30-1990 19:58:27 (TH added)
* Just re-wrap this to fit on one line, then put it in your
* QCONFIG.DAT.
*
* Then, when you want to test a command, RECORD a macro that starts
* with the command you wish to test, then this macro. For
* instance, if I wanted to test BegLine <Home>, I would do this:
*
* (1) Press MacroRecord <Ctrl M>
* (2) Press the key to record. (I use <Alt 1> usually).
* (3) Press the key to test, BegLine <Home>.
* (4) Press the above macro, <Alt F5>
* (5) End macro recording <Ctrl M>.
*
* Now I can just move my cursor around, and hit <Alt 1>, to test
* the true/false result of BegLine at different positions. The
* true or false comes up in a nice little box on the screen, and
* when I press Return the box sends itself away, and does not
* damage the file I am editing or anything.
*
* Note if you run the above <Alt F5> macro by itself, it always
* returns TRUE. QEdit does not remember the True/False state of
* the last command while "idle". Thus the necessity of recording
* the above within a macro.
*
* --Tim Farley
* SemWare Technical Support
* (Other) Macros available: See ALLMACRO.INF.
* See RFRMxx.QM for other commenting and un-commenting macros.
*
* ----------------------------------------------------------------------
* @(f6) Condense Qmac Textfile Macro to Fit On One Line of Qconfig.dat
* ----------------------------------------------------------------------
* This macro is useful for condensing a Qmac textfile macro to 'help'
* it fit on one line of Qconfig.dat:
* 'Label' replaced with 'L'
* Colon removed after jtrue, jfalse and jump lables
* "" removed
* " " replaced with #32 (for re-formatting)
* #173 characters replaced with '#173'
* #174 characters replaced with '#174'
* A line, column or character block may be marked before invoking,
* either open or closed, and all lines in block will be processed
* without pausing.
* CAUTION: Do not invoke @f6 on Qmac textfile of this file because
* the eob marker #173 #174 is in the compiled macro @f6 at
* the end of this file. Be sure to edit the output of this
* macro in case there are some cases I have not
* anticipated.
@f6 macrobegin
gotoblockend jtrue OK markline
gotoblockend jtrue OK
pause
OK:
setscreenoff
addline begline #173 #174
markline
gotoblockbeg begline lower
findreplace '""' return delline return 'ln' return
findreplace "label" return "L" return "ln" return
findreplace '" "' return '#32' return "ln" return
findreplace '"«"' return '#174' return "ln" return
AGAIN:
wordright isendline jfalse 1
wordright
1:
find ':' return delline return
jfalse END
find #173 #174 return delline return
jfalse END
prevposition
wordleft
wordleft
isendline jfalse 2
wordleft
2:
markword
cursorright
find 'j' return 'LB' return
jtrue DELCOLON
find 'L' return 'ILB' return
jfalse 2a
wordright
* wordright
2a:
wordright
wordright *:21
jump AGAIN
DELCOLON:
find ':' return delline return
delch
jump AGAIN
END:
find #173 #174 return 'G' return
delline
makebotofscreen unmarkblock
*
* 190 bytes Mon 06-22-1992 16:27:05 (TH @f6)
* Sample output of @f6
* --------------------
* @1 macrobegin cursorright gotoblockbeg jtrue l0 markline
* gotoblockbeg jtrue l1 pause jump l2 l0: gotoblockend
* unmarkblock markline prevposition l2: markline gotoblockbeg
* l1: begline cursorright find "*" return "lb" return jfalse l3
* shiftleft shiftleft jump l4 l3: shiftright shiftright begline
* gotoblockend markcolumn prevposition begline markcolumn fillblock #32
* return findreplace #32 return "*" return "ln" return l4:
*
* (Version) History
* ------------------
* 3.2 - Modified @3/4/5/6/7/0/t/f1/f2/f3/f4. 10/14/91
* 3.3 - Modified @0/5/7 and @f1. 1/27/92
* 3.3a - Modified @5 for all Qconfig's. 5/13/92
* Modified @f4 for QEdit v2.15. 5/17/92
* - In Amac43.zip. 5/27/92
* 3.3b - Added ( ) to Index line 1 for bok001.qm macros. 5/30/92
* - Added @f6. 6/21/92
*
*
*
*--eof